<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>Login</title>
    <!-- 控制页面其他url路径的前缀 -->
    <base href="${pageContext.request.contextPath}/">
    <!-- Meta tags -->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <!-- //Meta tags -->
    <link rel="stylesheet" href="statics/css/style.css" type="text/css" media="all" /><!-- Style-CSS -->
    <link href="statics/css/font-awesome.css" rel="stylesheet"><!-- font-awesome-icons -->
    <script type="text/javascript" src="statics/js/jQuery1.8.js"></script>
    <script type="text/javascript">
        $(function (){
            $("#verifyCode").on("click",function(){
                $(this).attr("src","login/verifyCode?a="+new Date());
            });
        });

    </script>
</head>

<body>
<section class="w3l-form-36">
    <div class="form-36-mian section-gap">
        <div class="wrapper">
            <div class="form-inner-cont">
                <h3>欢迎登录云和学院</h3>
                <form action="hzn" method="post" class="signin-form">
                    <div class="form-input">
                        <span class="fa fa-envelope-o" aria-hidden="true"></span>
                        <input type="text" name="userName" value="${username}"
                               placeholder="请输入用户名" />
                    </div>
                    <div class="form-input">
                        <span class="fa fa-key" aria-hidden="true"></span>
                        <input type="password" name="password" placeholder="请输入密码" value="${password}"  />
                    </div>
                    <div class="form-input" style="width: 175px;float: left">
                        <span class="fa fa-key" aria-hidden="true"></span>
                        <input type="text" name="verifyCode" placeholder="请输入验证码"
                                />
<%--                        <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>--%>
                    </div>
                    <image id="verifyCode" src="login/verifyCode" style="width: 120px;margin-top:10px;margin-left: 10px;padding-top: 10px;cursor: pointer" />

                    <div class="login-remember d-grid">
                        <label class="check-remaind">
                            <input type="checkbox" name="remember-me"  title="记住密码"/>
                            <span class="checkmark"></span>
                            <p class="remember">记住我</p>
                        </label>
                        <button class="btn theme-button">登录</button>
                    </div>
                </form>
                <!-- 显示spring security错误信息-->
                <p style="color:red;font-size: 18px;margin-top: 5px">${SPRING_SECURITY_LAST_EXCEPTION.message}</p>
            </div>

            <!-- copyright -->
            <div class="copy-right">
                <p>Copyright &copy; 2022.Company name All rights reserved.<a target="_blank" href="http://www.yunhe.cn">云和数据</a></p>
            </div>
            <!-- //copyright -->
        </div>
    </div>
</section>
</body>

</html>
